home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 43
/
Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso
/
Aminet
/
comm
/
tcp
/
rxsocket.lha
/
rxsocket
/
examples
/
suitable.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2001-03-01
|
749b
|
34 lines
/*
SEARCH FOR A "SUITABLE INTERFACE" = "UP AND NOT LOOPBACK"
*/
l="rexxsupport.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
l="rxsocket.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
prg=ProgramName("NOEXT")
if arg()~=0 then do
call PrintFault(118,prg)
exit
end
res=QueryInterfaces("in")
if res<0 then do
say prg": cannot query ("errno()")"
exit
end
if res==0 then do
say prg": no suitable device found"
exit
end
do i=0 to res-1
if in.i.family==2 & in.i.UP==1 & in.i.LOOPBACK==0 then do
say prg":" in.i.NAME
exit
end
end
say prg": no suitable device found"